package com.twd.allcomponent.login.controller;

import com.twd.allcomponent.common.RespBean;
import com.twd.allcomponent.login.service.UserService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class b {
    @Autowired
    private UserService userService;

    /**
     * 测试
     * @return
     */
    @ApiOperation("测试")
    @ApiResponses({
            @ApiResponse(code = 200,message = "成功",response = RespBean.class),
            @ApiResponse(code = 404,message = "找不到地址",response = RespBean.class)
    })
    @GetMapping("/aouth")
    @RequiresPermissions("eeee")
    public Object login(HttpServletRequest request){
        return request.getSession().getAttribute("permission");
    }

}
